package com.lcj.ssm.mapper;

import com.lcj.ssm.po.Department;
import com.lcj.ssm.po.DepartmentExample;
import com.lcj.ssm.po.DepartmentVO;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DepartmentMapper {
    int countByExample(DepartmentExample example);

    int deleteByExample(DepartmentExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Department record);

    int insertSelective(Department record);

    List<Department> selectByExample(DepartmentExample example);

    Department selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Department record, @Param("example") DepartmentExample example);

    int updateByExample(@Param("record") Department record, @Param("example") DepartmentExample example);

    int updateByPrimaryKeySelective(Department record);

    int updateByPrimaryKey(Department record);
    
    List<Department> selectDepartmentList(DepartmentVO departmentvo);
    
    List<Department> selectTopDepartmentList(DepartmentVO departmentvo);
    
    int selectTotalCount(Integer parentid);
    
    int selectTopDepartmentTotalCount();
    
    Department selectDepartmentByName(String name);
    
    List<Department> selectAll();
}